package org.mini.command
{
	public class AbstractSequenceCommand
	{
		public var nextCommand:AbstractSequenceCommand;
		
		public function AbstractSequenceCommand()
		{
		}
		
		public function execute():void
		{
			throw new Error("AbstractSequenceCommand is not intended to be used directly. Please subclass and override \"execute\" method.");
		}
		
		protected function executeNextCommand():void
		{
			try{
				if(this.nextCommand != null) this.nextCommand.execute();
			}catch(error:Error){
				trace("AbstractSequenceCommand next command error!");
			}
		}
	}
}